-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPAM Address Support for Bloxone Ansible v2 #55
base: v2
Are you sure you want to change the base?
Conversation
Missing change logs and deprecation notices for this object . Earlier this module was termed as ipv4_reservation ! |
plugins/modules/ipam_address.py
Outdated
state: "present" | ||
register: subnet | ||
|
||
- name: Create a Address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Examples should have only the required tasks. Here , the tasks for creation of parents i.e. Ip Space and Subnet , one task containing the creation of the address with a few relevant fields and another for the deletion of the address should be sufficient. Others can be removed !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
plugins/modules/ipam_address_info.py
Outdated
state: "present" | ||
register: subnet | ||
|
||
- name: Create A Address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is an example for Info , remove all the create statements here , just keep the get/ info statements .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -0,0 +1,2 @@ | |||
--- | |||
dependencies: [setup_address] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependencies include the setup required used in the main file for the creation of an address , something like ip space or subnet !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
plugins/modules/ipam_address_info.py
Outdated
- name: Get information about the Address by tag | ||
infoblox.bloxone.ipam_address_info: | ||
tag_filters: | ||
region : "eu" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
region : "eu" | |
location : "site-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
plugins/modules/ipam_address_info.py
Outdated
- name: Get information about the Address by ID | ||
infoblox.bloxone.ipam_address_info: | ||
id: "{{ address.id }}" | ||
register: address_info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registering the result of the object is not important as it is not being used anywhere . Hence all the registers can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
filters: { | ||
address: "10.0.0.6", | ||
space: "{{ _ip_space.id }}", | ||
hwaddr: "00:11:22:33:44:55" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The address can be filtered with just address and space , hwaddr isnt required here !
The same applies for all the subsequent tasks below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
always: | ||
# Cleanup if the test fails | ||
- name: Delete a Subnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing cleanup call for address.
api_key: "{{ api_key }}" | ||
block: | ||
# Basic tests for Address Block | ||
- name: Create A Address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Create A Address | |
- name: Create an Address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
infoblox.bloxone.ipam_address: | ||
address: "10.0.0.3" | ||
space: "{{ _ip_space.id }}" | ||
tags: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a random tag ,as done in other objects .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOne
- address_info.objects | length != 0 | ||
|
||
always: | ||
# Cleanup if the test fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup required for address
No description provided.